package org.mm.proxycache.http;


public interface MutableHttpMessage extends HttpMessage
{
    /**
     * Sets the version of the protocol associated with this request.
     */
    void version( HttpVersion httpVersion );

    /**
     * Sets the <tt>Content-Type</tt> header of the response.
     * 
     * @param type
     *            The content type.
     */
    void contentType( String type );

    /**
     * Sets the <tt>Connection</tt> header of the response.
     */
    void keepAlive( boolean keepAlive );

    /**
     * Adds an HTTP header to this response. Adding a header does not cause any
     * existing headers with the same name to be overwritten
     * 
     * @param name
     *            The header name
     * @param value
     *            The header value
     */
    void addHeader( String name, String value );

    /**
     * Removes all HTTP headers with the specified name.
     */
    void removeHeader( String name );

    /**
     * Sets the value of an HTTP header. Any existing headers with the specified
     * name are removed
     * 
     * @param name
     *            The header name
     * @param value
     *            The header value
     */
    void header( String name, String value );
    
    void contentLength( int length );
    
    void addChunkSize( int size );

}
